package name.jautzy.esi.server.model;

import name.jautzy.cedb.model.Bonus;
import name.jautzy.esi.client.model.Fit;

public class FitBonusApply {
	private Fit fit;
	private long skillLevel = 5;
	private FitFactory factory;
	
	public FitBonusApply(Fit fit, FitFactory factory) {
		this.fit = fit;
		this.factory = factory;
	}
	
	public void applyAfterburnerSpeed(Bonus b) {
		factory.setAftSpeedBonus(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyAgility(Bonus b) {
		factory.addCorrectionNoStack("Agility", b.getBonusValue(skillLevel));
	}
	
	public void applyArmorHp(Bonus b) {
		factory.addCorrectionNoStack("ArmorHP", b.getBonusValue(skillLevel));
	}
	
	public void applyArmorRepairAmount(Bonus b) {
		factory.addCorrectionNoStack("ArmorRepair", b.getBonusValue(skillLevel));
	}
	
	public void applyArmorRepairDuration(Bonus b) {
		factory.addCorrectionNoStack("ArmorRepairDuration", b.getBonusValue(skillLevel));
	}
	
	public void applyArmorResistance(Bonus b) {
		fit.correctEmAR(1.0-b.getBonusValue(skillLevel));
		fit.correctExAR(1.0-b.getBonusValue(skillLevel));
		fit.correctThAR(1.0-b.getBonusValue(skillLevel));
		fit.correctKiAR(1.0-b.getBonusValue(skillLevel));
	}
	
	public void applyBoosterCapConsumption(Bonus b) {
		factory.addCorrectionNoStack("BoostCapUsage", b.getBonusValue(skillLevel));
	}
	
	public void applyBubbleImmunity(Bonus b) {
		fit.setWarpImmune(true);
	}
	
	public void applyCapacitorCapacity(Bonus b) {
		factory.addCorrectionNoStack("Capacitor", b.getBonusValue(skillLevel));
	}
	
	public void applyCapacitorRechargeRate(Bonus b) {
		factory.addCorrectionNoStack("CapRechargeTime", b.getBonusValue(skillLevel));
	}
	
	public void applyCargoCapacity(Bonus b) {
		factory.addCorrectionNoStack("Cargohold", b.getBonusValue(skillLevel));
	}
	
	public void applyCPU(Bonus b) {
		fit.correctMaxCpu(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyDronebayCapacity(Bonus b) {
		fit.addDroneCapacity(b.getBonusValue(skillLevel));
	}
	
	public void applyDroneDamage(Bonus b) {
		factory.addCorrectionNoStack("DroneAlpha",b.getBonusValue(skillLevel));
	}
	
	public void applyDroneHp(Bonus b) {
		// Empty
	}
	
	public void applyDroneMiningYeld(Bonus b) {
		// Empty
	}
	
	public void applyDroneNb(Bonus b) {
		fit.addNbDrones((long)b.getBonusValue(skillLevel));
	}
	
	public void applyDroneRange(Bonus b) {
		fit.addDroneRange(b.getBonusValue(skillLevel)*1000);
	}
	
	public void applyECMBurstRange(Bonus b) {
		//Empty
	}
	
	public void applyECMCapUsage(Bonus b) {
		factory.correcteCMCapNeedBonus(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyECMFalloff(Bonus b) {
		//Empty
	}
	
	public void applyECMOptimal(Bonus b) {
		//Empty
	}
	
	public void applyECMStrength(Bonus b) {
		//Empty
	}
	
	public void applyEnergyTransferCapUsage(Bonus b) {
		factory.correctRemEnergyCapNeedBonus(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyEnergyTransferPower(Bonus b) {
		factory.correctRemEnergyPowerNeedBonus(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyEnergyTransferRange(Bonus b) {
		// Empty
	}
	
	public void applyFighterDamage(Bonus b) {
		factory.addCorrectionNoStack("DroneAlpha",b.getBonusValue(skillLevel));
	}
	
	public void applyFighterRange(Bonus b) {
		factory.addCorrectionNoStack("DroneRange",b.getBonusValue(skillLevel));
	}
	
	public void applyGangArmorHp(Bonus b) {
		// Empty
	}
	
	public void applyGangCapacitorRechargeRate(Bonus b) {
		// Empty
	}
	
	public void applyGangShieldHp(Bonus b) {
		// Empty
	}
	
	public void applyGangSignatureRadius(Bonus b) {
		// Empty
	}
	
	public void applyHeatBonus(Bonus b) {
		// Empty
	}
	
	public void applyIceHarvesterRof(Bonus b) {
		// Empty
	}
	
	public void applyIceHarvesterYeld(Bonus b) {
		// Empty
	}
	
	public void applyMercoxitYeld(Bonus b) {
		// Empty
	}
	
	public void applyMiningYeld(Bonus b) {
		// Empty
	}
	
	public void applyMiningCapUsage(Bonus b) {
		// Empty
	}
	
	public void applyMissileDRF(Bonus b) {
		factory.addCorrectionNoStack("MissileDRF",b.getBonusValue(skillLevel));
	}
	
	public void applyMissileVelocity(Bonus b) {
		factory.addCorrectionNoStack("MissileVelocity",b.getBonusValue(skillLevel));
	}
	
	public void applyMissileExploVelocity(Bonus b) {
		factory.addCorrectionNoStack("MissileExploVelocity",b.getBonusValue(skillLevel));
	}
	
	public void applyMissileFlightTime(Bonus b) {
		factory.addCorrectionNoStack("MissileFlightTime",b.getBonusValue(skillLevel));
	}
	
	public void applyMissilePower(Bonus b) {
		factory.correctLauncherPowerNeedBonus(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyMissileRof(Bonus b) {
		factory.addCorrectionNoStack("MissileRof",b.getBonusValue(skillLevel));
	}
	
	public void applyMissileDamage(Bonus b) {
		factory.addCorrectionNoStack("MissileAlpha",b.getBonusValue(skillLevel));
	}
	
	public void applyMWDCapUsage(Bonus b) {
		factory.setMwdCapNeedBonus(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyMWDSigRadius(Bonus b) {
		factory.setMwdSigBonus(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyPowerOutput(Bonus b) {
		fit.correctMaxPower(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyProbeFlightTime(Bonus b) {
		//Empty
	}
	
	public void applyProbeScanStrength(Bonus b) {
		//Empty
	}
	
	public void applyRemoteArmorRepairAmount(Bonus b) {
		//Empty
	}
	
	public void applyRemoteArmorRepairCapUsage(Bonus b) {
		factory.correctRemArmorCapNeedBonus(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyRemoteArmorRepairRange(Bonus b) {
		factory.setRemArmorPowerNeedBonus(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyRemoteSensorDampenerCapUsage(Bonus b) {
		factory.correctSensorCapNeedBonus(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyRemoteSensorDampenerStrength(Bonus b) {
		//Empty
	}
	
	public void applyRemoteShieldRepairAmount(Bonus b) {
		//Empty
	}
	
	public void applyRemoteShieldRepairRange(Bonus b) {
		//Empty
	}
	
	public void applyScanResolution(Bonus b) {
		factory.addCorrectionNoStack("ScanResolution",b.getBonusValue(skillLevel));
	}
	
	public void applyScrambleCapBonus(Bonus b) {
		factory.setScrambleCapNeedBonus(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyScrambleRange(Bonus b) {
		//Empty
	}
	
	public void applySensorStrength(Bonus b) {
		factory.addCorrectionNoStack("SensorStrength",b.getBonusValue(skillLevel));
	}
	
	public void applyShieldBoostAmount(Bonus b) {
		factory.addCorrectionNoStack("ShieldBoost",b.getBonusValue(skillLevel));
	}
	
	public void applyShieldHp(Bonus b) {
		factory.addCorrectionNoStack("ShieldHP",b.getBonusValue(skillLevel));
	}
	
	public void applyShieldTransportCapUsage(Bonus b) {
		factory.correctRemShieldCapNeedBonus(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyShieldTransportCPU(Bonus b) {
		factory.setRemShieldCpuNeedBonus(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyShipVelocity(Bonus b) {
		factory.addCorrectionNoStack("Velocity",b.getBonusValue(skillLevel));
	}
	
	public void applySigRadius(Bonus b) {
		factory.addCorrectionNoStack("Signature",b.getBonusValue(skillLevel));
	}
	
	public void applyStructHp(Bonus b) {
		factory.addCorrectionNoStack("StructHP",b.getBonusValue(skillLevel));
	}
	
	public void applyTargetingRange(Bonus b) {
		factory.addCorrectionNoStack("TargetRange",b.getBonusValue(skillLevel));
	}
	
	public void applyTurretCapUsage(Bonus b) {
		factory.correctTurretCapNeedBonus(1.0+b.getBonusValue(skillLevel));
	}
	
	public void applyTurretDamage(Bonus b) {
		factory.addCorrectionNoStack("TurretAlpha",b.getBonusValue(skillLevel));
	}
	
	public void applyTurretFalloff(Bonus b) {
		factory.addCorrectionNoStack("TurretFalloff",b.getBonusValue(skillLevel));
	}
	
	public void applyTurretOptimal(Bonus b) {
		factory.addCorrectionNoStack("TurretOptimal",b.getBonusValue(skillLevel));
	}
	
	public void applyTurretRof(Bonus b) {
		factory.addCorrectionNoStack("TurretRof",b.getBonusValue(skillLevel));
	}
	
	public void applyTurretTracking(Bonus b) {
		factory.addCorrectionNoStack("TurretTracking",b.getBonusValue(skillLevel));
	}
	
	public void applyStasisRange(Bonus b) {
		//Empty
	}
	
	public void applyStasisStrength(Bonus b) {
		//Empty
	}
	
	public void applyStripMinersYeld(Bonus b) {
		//Empty
	}
	
	public void applySurveyProbeFlightTime(Bonus b) {
		//Empty
	}
	
	public void applyTargetPainterStrength(Bonus b) {
		//Empty
	}
	
	public void applyTrackingDisruptorStrength(Bonus b) {
		//Empty
	}

	public void applyTrackingLinksRange(Bonus b) {
		//Empty
	}
	
	public void applyTrackingLinksStrength(Bonus b) {
		//Empty
	}
	
	public void applyTractorBeamRange(Bonus b) {
		//Empty
	}
	
	public void applyVampireNeutraDrain(Bonus b) {
		//Empty
	}
	
	public void applyVampireNeutraRange(Bonus b) {
		//Empty
	}
	
	public void applyWarpSpeed(Bonus b) {
		//Empty
	}
	
	public void applyShieldResistance(Bonus b) {
		fit.correctEmSR(1.0-b.getBonusValue(skillLevel));
		fit.correctExSR(1.0-b.getBonusValue(skillLevel));
		fit.correctThSR(1.0-b.getBonusValue(skillLevel));
		fit.correctKiSR(1.0-b.getBonusValue(skillLevel));
	}

}
